/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.cgb.portal.entity;

import java.io.Serializable;
import java.util.Calendar;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.SequenceGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author LUCAS
 */
@Entity(name = "\"NEWS\"")
@SequenceGenerator(name = "NEWS_GEN", sequenceName = "NEWS_GEN",
allocationSize = 1, initialValue = 1)
public class News implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "NEWS_GEN")
    private Long id;
    @Lob
    private String description;
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "publication_date")
    private Calendar publicationDate;
    @Column(name = "photo_url")
    private String photoUrl;
    @Column(name = "video_url")
    private String videoUrl;

    public News() {
    }

    public News(String description, Calendar publicationDate, String photoUrl, String videoUrl) {
        this.description = description;
        this.publicationDate = publicationDate;
        this.photoUrl = photoUrl;
        this.videoUrl = videoUrl;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Calendar getPublicationDate() {
        return publicationDate;
    }

    public void setPublicationDate(Calendar publicationDate) {
        this.publicationDate = publicationDate;
    }

    public String getPhotoUrl() {
        return photoUrl;
    }

    public void setPhotoUrl(String photoUrl) {
        this.photoUrl = photoUrl;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }
}
